<!doctype html>
<html lang="en">

<head>
    <title>Performance Test Management Platform</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <!-- VENDOR CSS -->
    <link rel="stylesheet" href="/static/vendor/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/vendor/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="/static/vendor/linearicons/style.css">
    <!-- MAIN CSS -->
    <link rel="stylesheet" href="/static/css/main.css">
    <!-- GOOGLE FONTS -->
    <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700" rel="stylesheet">
    <!-- ICONS -->
    <link rel="icon" type="image/png" sizes="32x32" href="/static/img/favicon.ico">
    {% block css %}{% endblock %}
</head>

<body>
<!-- WRAPPER -->
<div id="wrapper">
    <!-- NAVBAR -->
    <nav class="navbar navbar-default navbar-fixed-top">
        <div class="brand">
            <img src="/static/img/logo-dark.png" alt="Automation test platform for performance" class="img-responsive logo">
        </div>
        <div class="container-fluid">
            <div class="navbar-btn">
                <button type="button" class="btn-toggle-fullwidth"><i class="lnr lnr-arrow-left-circle"></i></button>
            </div>
            <div id="navbar-menu">
                <ul class="nav navbar-nav navbar-right">
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown"><img src="/static/img/user.png" class="img-circle" alt="Avatar">
                            <span>{{ username }}</span> <i class="icon-submenu lnr lnr-chevron-down"></i></a>
                        <ul class="dropdown-menu">
                            <li><a href="/atp4p/logout/"><i class="lnr lnr-exit"></i> <span>Logout</span></a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </nav>

    <div id="sidebar-nav" class="sidebar">
        <div class="sidebar-scroll">
            <nav>
                <ul class="nav">
                    <li>
                        <a href="#baseinfo" data-toggle="collapse" class="collapsed"><i class="lnr lnr-file-empty"></i>
                            <span>Project</span> <i class="icon-submenu lnr lnr-chevron-left"></i></a>
                        <div id="baseinfo" class="collapse ">
                            <ul class="nav">
                                <li><a href="/atp4p/project/" class="">Test project</a></li>
                                <li><a href="/atp4p/scene/" class="">Test scenario</a></li>
                                <li><a href="/atp4p/result/" class="">Test result</a></li>
                                <li><a href="/atp4p/baseline/" class="">Baseline</a></li>
                            </ul>
                        </div>
                    </li>
                    {% if user.is_superuser or perms.user.add_user %}
                    <li>
                        <a href="#system" data-toggle="collapse" class="collapsed"><i class="lnr lnr-cog"></i> <span>System setting</span>
                            <i class="icon-submenu lnr lnr-chevron-left"></i></a>
                        <div id="system" class="collapse ">
                            <ul class="nav">
                                <li><a href="/atp4p/user/" class="">User management</a></li>
                            </ul>
                        </div>
                    </li>
                    {% endif %}
                </ul>
            </nav>
        </div>
    </div>
    <!-- END LEFT SIDEBAR -->
    <!-- MAIN -->
    <div class="main">
        <div class="main-content">
            <div class="container-fluid">
                {% block crumbs %}
                {% endblock %}
                {% block body %}
                {% endblock %}
            </div>
        </div>
    </div>
</div>
</body>

<script src="/static/vendor/jquery/jquery.min.js"></script>
<script src="/static/vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="/static/vendor/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<script src="/static/scripts/klorofil-common.js"></script>
<script src="/static/scripts/go-page.js"></script>
<script>
    $(document).ready(function () {
        var a_name = $("a.this").text();
        var page_name = $("a.this-page").text();
        if (a_name) {
            $("span:contains(" + a_name + ")").parent('a').removeClass("collapsed");
            $("span:contains(" + a_name + ")").parent('a').addClass("active");
            if (page_name){
                $("a:contains(" + page_name + ")").parent('li').parent('ul').parent('div').removeClass("collapse");
                $("a:contains(" + page_name + ")").parent('li').parent('ul').parent('div').addClass("collapse in");
                $("a:contains(" + page_name + ")").addClass("active");
            }
        }
    });
    
	function checkAll(){
        var checkAllEle = document.getElementById("box");
        if(checkAllEle.checked==true){
	        var checkOnes = document.getElementsByName("checkOne");
	        for(var i=0;i<checkOnes.length;i++){
	            checkOnes[i].checked=true;
			}
		}
        else{
            var checkOnes = document.getElementsByName("checkOne");
            for(var i=0;i<checkOnes.length;i++){
            checkOnes[i].checked=false;
            }
        }
    }
    
    function check(){
        var checkOnes = document.getElementsByName("checkOne");
        var a=0;
        var checkAllEle = document.getElementById("box");
        for(var i=0;i<checkOnes.length;i++){
            if(checkOnes[i].checked==false){
                checkAllEle.checked=false;
                break;
            }
            a++;
        }
        if(a==checkOnes.length){
            checkAllEle.checked=true;
        }
    }
</script>
{% block javascript %} {% endblock %}
</html>
